package model.dao;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;


import model.pojo.AccountType;
import model.util.MySqlDataAccessHelper;

public class AcountTypeDAO {
	MySqlDataAccessHelper helper = new MySqlDataAccessHelper();
	
	// get all account type
	public List<String> getAllAccountType(){
		List<String> lstAccType = new ArrayList<String>();
		try{
			helper.open();
			String sql = "select * from accttype";
			ResultSet rs = helper.executeQuery(sql);
			while(rs.next()){
//				AccountType accountType = new AccountType();
//				accountType.setAccountID(rs.getString("AcctID"));
//				accountType.setDescrVN(rs.getString("DescEN"));
//				accountType.setDescrEN(rs.getString("DescVN"));
//				accountType.setDescrKR(rs.getString("DescKR"));
				
//				lstAccType.add(accountType);
				lstAccType.add(rs.getString("DescEN"));
			}
		}catch (Exception e) {
		}finally{
			helper.close();
		}
		return lstAccType;
	}

}
